import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author <a href="mailto:xingxiao@gtmap.cn">xingxiaofeng</a>
 * @version2.1 2021-06-21
 * @description
 */
public class VerifyHouseMain {
    public static void main(String[] args) {
        List<Map> list = new ArrayList<Map>();  //验证规则
        Map retMap = new HashMap();//返回接口结果
        Map mapResult = new HashMap();
        mapResult = getMessage(retMap, list, mapResult);

    }

    public static Map getMessage(Map retMap, List<Map> list, Map mapResult) {
        for (Map _map : list) {
            IVerifyHouse verifyHouse = (IVerifyHouse) SpringContextUtil.getBean(_map.get("YS_LMC").toString());

            mapResult = verifyHouse.verify(retMap, _map, mapResult);
            if ((Boolean) mapResult.get("flag")) {
                getMessage(retMap, list, mapResult);
            }
        }
        return  mapResult;
    }

}
